package day2;

import day2.pet.Dog;
import day2.pet.Pet;

import java.util.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class PetList {
    public static void main(String[] args) {
        List list=new ArrayList();
        list.add(new Dog("小花花","公",100,100));
        list.add(new Dog("王二狗","公",66,100));
        list.add(new Dog("小花狗","公",44,100));
        list.add(new Dog("大黄","公",88,100));

        Dog d=new Dog("小花花","母",50,80);
        boolean in=list.contains(d);//重写equals:
        System.out.println(in);
    }
}
